<template>
  <div class="app-container home">
    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>总题录数</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i> 
              {{this.totalTitle}}
            </p>
          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>国标总数</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i> 
              {{this.gbTotal}}
            </p>
          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>地标题录</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i>
              {{this.dbTotal}}
            </p>
          </div>
        </el-card>
      </el-col>
    </el-row>

     <el-row :gutter="20" style="margin-top:20px;">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>内蒙古地方标准题录</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i> 
              {{this.nmTitle}}
            </p>
          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>蒙字标</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i>
              {{this.mTitle}}
            </p>
          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>总文本</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i>
              {{this.totalFile}}
            </p>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <el-row :gutter="20" style="margin-top:20px;">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>用户数量</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i>
              {{this.totalUser}}
            </p>
          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>销售额</span>
          </div>
          <div class="body">
            <p class="staticnum">
              <i class="el-icon-s-promotion"></i>
              {{this.totalMoney}} 
            </p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { getTotalTitle,getGbTitle,getDbTitle,getNmTitle,getMtitle,getTotalFile,getTotalUser,getTotalMoney } from "@/api/system/statistics";

export default {
  name: "Index",
  data() {
    return {
      // 版本号
      version: "3.8.6",
      totalTitle: '',
      gbTotal: '',
      dbTotal: '',
      nmTitle: '',
      mTitle: '',
      totalFile: '',
      totalUser: '',
      totalMoney: ''
    };
  },
  created() {
    getTotalTitle().then(response=>{
      this.totalTitle = response.data.data;
    })
    getGbTitle().then(response=>{
      this.gbTotal = response.data.data;
    })
    getDbTitle().then(response=>{
      this.dbTotal = response.data.data;
    })
    getNmTitle().then(response=>{
      this.nmTitle = response.data.data;
    })
    getMtitle().then(response=>{
      this.mTitle = response.data.data;
    })
    getTotalFile().then(response=>{
      this.totalFile = response.data.data;
    })
    getTotalUser().then(response=>{
      this.totalUser = response.data;
    })
    getTotalMoney().then(response=>{
      this.totalMoney = response.msg;
    })
    
  },
  methods: {
    goTarget(href) {
      window.open(href, "_blank");
    }
  }
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }

  .staticnum{
    font-size:18px;
  }
}
</style>

